Ext.define('Admin.view.tender.TenderEditForm', {
    extend: 'Admin.ux.form.FormPanel',
    xtype: 'tenderedit-form',
    bodyStyle:'padding:5px 5px 5px 5px;',
    controller:'tender',
    items: [
        {xtype: 'hiddenfield', name: 'id'},
        {
            layout: {
                type: 'column',
                border:false
            },
            items: [
                {
                    xtype: 'textfield',
                    name: 'title',
                    readOnlyCls: 'x-item-abled',
                    fieldLabel: '标题',
                    emptyText: '请输入标题[4-50位汉字]',
                    minLength: 4,
                    maxLength: 50,
                    labelWidth: 30,
                    columnWidth: .5,
                    float: 'left'
                },
                {
                    xtype: 'textfield',
                    name: 'tenderno',
                    readOnlyCls: 'x-item-abled',
                    fieldLabel: '招标公告编号',
                    emptyText: '请输入标题[4-50位编号]',
                    minLength: 4,
                    maxLength: 50,
                    labelWidth: 100,
                    columnWidth: .5,
                    float: 'right'
                }
            ]
        },
        {
            layout: {
                type: 'column'
            },
            items: [
                {
                    xtype: 'combobox',
                    fieldLabel: '类型',
                    emptyText: '全部',
                    displayField: 'tenderareaname',
                    valueField: 'tenderarea',
                    queryMode: 'local',
                    minChars: 1,
                    remoteFilter: true,
                    editable: true,
                    forceSelection: true,
                    filterPickList: true,
                    labelWidth: 30,
                    columnWidth: .5,
                    float: 'left',
                    name: 'tenderarea',
                    store: Ext.create('Ext.data.Store', {
                        fields: ['tenderarea','tenderareaname'],
                        data: [
                            ['001','招标专区']
                        ],
                        autoLoad: true
                    })
                },
                {
                    xtype: 'combobox',
                    fieldLabel: '公告类型',
                    emptyText: '全部',
                    displayField: 'noticetypename',
                    valueField: 'noticetype',
                    queryMode: 'local',
                    minChars: 1,
                    remoteFilter: true,
                    editable: true,
                    forceSelection: true,
                    filterPickList: true,
                    columnWidth: .5,
                    float: 'right',
                    labelWidth: 60,
                    name: 'noticetype',
                    store: Ext.create('Ext.data.Store', {
                        fields: ['noticetype','noticetypename'],
                        data: [
                            ['00101','招标公告'],
                            ['00102','资格预审公告'],
                            ['00103','中标通知书'],
                            ['00104','变更公告'],
                            ['00105','澄清公告'],
                            ['00106','招标结果公示']
                        ],
                        autoLoad: true
                    })
                }
            ]
        },
        {
            layout: {
                type: 'column'
            },
            items: [
                {
                    xtype: 'textfield',
                    name: 'source',
                    readOnlyCls: 'x-item-abled',
                    fieldLabel: '来源',
                    labelWidth: 30,
                    columnWidth: .5,
                    float: 'left'
                },
                {
                    xtype: 'textfield',
                    name: 'tenderman',
                    labelWidth: 50,
                    readOnlyCls: 'x-item-abled',
                    float:'right',
                    columnWidth: .5,
                    fieldLabel: '招标人'
                }
            ]
        },
        {
            layout: {
                type: 'column'
            },
            items:[
                {
                    xtype: 'checkboxgroup',
                    fieldLabel: '所属板块',
                    // Arrange checkboxes into two columns, distributed vertically
                    columns: 5,
                    labelWidth: 60,
                    columnWidth: .9,
                    vertical: true,
                    items: [
                        {boxLabel: '煤炭', name: 'section', inputValue: '煤炭'},
                        {boxLabel: '电力', name: 'section', inputValue: '电力'},
                        {boxLabel: '铝业', name: 'section', inputValue: '铝业'},
                        {boxLabel: '新能源', name: 'section', inputValue: '新能源'},
                        {boxLabel: '其他', name: 'section', inputValue: '其他'}
                    ]
                }
            ]
        },
        {
            layout: {
                type: 'column'
            },
            items: [
                {
                    xtype: 'checkboxgroup',
                    fieldLabel: '采购类别',
                    labelWidth: 60,
                    // Arrange checkboxes into two columns, distributed vertically
                    columns: 4,
                    columnWidth: .9,
                    vertical: true,
                    items: [
                        {boxLabel: '工程招标', name: 'purchasetype', inputValue: '工程招标'},
                        {boxLabel: '物资招标', name: 'purchasetype', inputValue: '物资招标'},
                        {boxLabel: '服务招标', name: 'purchasetype', inputValue: '服务招标'},
                        {boxLabel: '其他', name: 'purchasetype', inputValue: '其他'}
                    ]
                }
            ]
        },
        {
            layout: {
                type: 'column'
            },
            items: [
                {
                    xtype: 'datefield',
                    name: 'opentime',
                    format : 'Y-m-d H:i:s',
                    columnWidth: .5,
                    labelWidth: 60,
                    float: 'left',
                    fieldLabel: '开标时间'
                },
                {
                    xtype: 'datefield',
                    name: 'endtime',
                    format : 'Y-m-d H:i:s',
                    columnWidth: .5,
                    labelWidth: 60,
                    float: 'right',
                    fieldLabel: '报名截止'
                }
            ]
        },
        {
            layout: {
                type: 'column'
            },
            items: [
                {
                    xtype: 'button',
                    name: 'biaoduan',
                    columnWidth: .9,
                    labelWidth: 100,
                    float: 'left',
                    text: '编辑标段标包',
                    textAlign: 'center'
                }
            ]
        },
        {
            fieldLabel: '内容',
            labelWidth: 30,
            name: "noticecontent",
            xtype: 'kindeditor',
            anchor: '-20',
            height: 800,
            kindeditorConfig: {
                //编辑器配置项
                uploadJson: '/upload/uploadFile', //上传文件服务器地址
                fileManagerJson: '/upload/fileManager', //文件管理服务器地址
                allowFileManager: false
            }
        }
    ]
});